[Admin] Atualizar aula
curl --request PUT \
--url https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"courseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lessonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"htmlContent": "<string>",
"content": "<string>",
"mediaUrl": "<string>",
"duration": 123,
"isDraft": true,
"free": true,
"coverUrl": "<string>",
"launchAt": "2023-11-07T05:31:56Z",
"finishAt": "2023-11-07T05:31:56Z",
"isAudio": true,
"showSubtitles": true,
"moduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": [
{
"url": "<string>",
"filename": "<string>",
"size": 123
}
],
"mediaAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instructorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"showCompleteButton": true,
"allowComments": true,
"allowPdfDownload": true,
"mediaType": 123
}
'import requests
url = "https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}"
payload = {
"courseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lessonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"htmlContent": "<string>",
"content": "<string>",
"mediaUrl": "<string>",
"duration": 123,
"isDraft": True,
"free": True,
"coverUrl": "<string>",
"launchAt": "2023-11-07T05:31:56Z",
"finishAt": "2023-11-07T05:31:56Z",
"isAudio": True,
"showSubtitles": True,
"moduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": [
{
"url": "<string>",
"filename": "<string>",
"size": 123
}
],
"mediaAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instructorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"showCompleteButton": True,
"allowComments": True,
"allowPdfDownload": True,
"mediaType": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
courseId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lessonId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
htmlContent: '<string>',
content: '<string>',
mediaUrl: '<string>',
duration: 123,
isDraft: true,
free: true,
coverUrl: '<string>',
launchAt: '2023-11-07T05:31:56Z',
finishAt: '2023-11-07T05:31:56Z',
isAudio: true,
showSubtitles: true,
moduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attachments: [{url: '<string>', filename: '<string>', size: 123}],
mediaAssetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
instructorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
showCompleteButton: true,
allowComments: true,
allowPdfDownload: true,
mediaType: 123
})
};
fetch('https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'courseId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lessonId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'htmlContent' => '<string>',
'content' => '<string>',
'mediaUrl' => '<string>',
'duration' => 123,
'isDraft' => true,
'free' => true,
'coverUrl' => '<string>',
'launchAt' => '2023-11-07T05:31:56Z',
'finishAt' => '2023-11-07T05:31:56Z',
'isAudio' => true,
'showSubtitles' => true,
'moduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attachments' => [
[
'url' => '<string>',
'filename' => '<string>',
'size' => 123
]
],
'mediaAssetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'instructorId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'showCompleteButton' => true,
'allowComments' => true,
'allowPdfDownload' => true,
'mediaType' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}"
payload := strings.NewReader("{\n \"courseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lessonId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"content\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"duration\": 123,\n \"isDraft\": true,\n \"free\": true,\n \"coverUrl\": \"<string>\",\n \"launchAt\": \"2023-11-07T05:31:56Z\",\n \"finishAt\": \"2023-11-07T05:31:56Z\",\n \"isAudio\": true,\n \"showSubtitles\": true,\n \"moduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"filename\": \"<string>\",\n \"size\": 123\n }\n ],\n \"mediaAssetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"instructorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"showCompleteButton\": true,\n \"allowComments\": true,\n \"allowPdfDownload\": true,\n \"mediaType\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"courseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lessonId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"content\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"duration\": 123,\n \"isDraft\": true,\n \"free\": true,\n \"coverUrl\": \"<string>\",\n \"launchAt\": \"2023-11-07T05:31:56Z\",\n \"finishAt\": \"2023-11-07T05:31:56Z\",\n \"isAudio\": true,\n \"showSubtitles\": true,\n \"moduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"filename\": \"<string>\",\n \"size\": 123\n }\n ],\n \"mediaAssetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"instructorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"showCompleteButton\": true,\n \"allowComments\": true,\n \"allowPdfDownload\": true,\n \"mediaType\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"courseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lessonId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"content\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"duration\": 123,\n \"isDraft\": true,\n \"free\": true,\n \"coverUrl\": \"<string>\",\n \"launchAt\": \"2023-11-07T05:31:56Z\",\n \"finishAt\": \"2023-11-07T05:31:56Z\",\n \"isAudio\": true,\n \"showSubtitles\": true,\n \"moduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"filename\": \"<string>\",\n \"size\": 123\n }\n ],\n \"mediaAssetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"instructorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"showCompleteButton\": true,\n \"allowComments\": true,\n \"allowPdfDownload\": true,\n \"mediaType\": 123\n}"
response = http.request(request)
puts response.read_bodyCursos
[Admin] Atualizar aula
PUT
/
api
/
v2
/
admin
/
education
/
courses
/
{courseId}
/
lessons
/
{lessonId}
[Admin] Atualizar aula
curl --request PUT \
--url https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"courseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lessonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"htmlContent": "<string>",
"content": "<string>",
"mediaUrl": "<string>",
"duration": 123,
"isDraft": true,
"free": true,
"coverUrl": "<string>",
"launchAt": "2023-11-07T05:31:56Z",
"finishAt": "2023-11-07T05:31:56Z",
"isAudio": true,
"showSubtitles": true,
"moduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": [
{
"url": "<string>",
"filename": "<string>",
"size": 123
}
],
"mediaAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instructorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"showCompleteButton": true,
"allowComments": true,
"allowPdfDownload": true,
"mediaType": 123
}
'import requests
url = "https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}"
payload = {
"courseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lessonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"htmlContent": "<string>",
"content": "<string>",
"mediaUrl": "<string>",
"duration": 123,
"isDraft": True,
"free": True,
"coverUrl": "<string>",
"launchAt": "2023-11-07T05:31:56Z",
"finishAt": "2023-11-07T05:31:56Z",
"isAudio": True,
"showSubtitles": True,
"moduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attachments": [
{
"url": "<string>",
"filename": "<string>",
"size": 123
}
],
"mediaAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instructorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"showCompleteButton": True,
"allowComments": True,
"allowPdfDownload": True,
"mediaType": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
courseId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lessonId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
htmlContent: '<string>',
content: '<string>',
mediaUrl: '<string>',
duration: 123,
isDraft: true,
free: true,
coverUrl: '<string>',
launchAt: '2023-11-07T05:31:56Z',
finishAt: '2023-11-07T05:31:56Z',
isAudio: true,
showSubtitles: true,
moduleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
attachments: [{url: '<string>', filename: '<string>', size: 123}],
mediaAssetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
instructorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
showCompleteButton: true,
allowComments: true,
allowPdfDownload: true,
mediaType: 123
})
};
fetch('https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'courseId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lessonId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'htmlContent' => '<string>',
'content' => '<string>',
'mediaUrl' => '<string>',
'duration' => 123,
'isDraft' => true,
'free' => true,
'coverUrl' => '<string>',
'launchAt' => '2023-11-07T05:31:56Z',
'finishAt' => '2023-11-07T05:31:56Z',
'isAudio' => true,
'showSubtitles' => true,
'moduleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'attachments' => [
[
'url' => '<string>',
'filename' => '<string>',
'size' => 123
]
],
'mediaAssetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'instructorId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'showCompleteButton' => true,
'allowComments' => true,
'allowPdfDownload' => true,
'mediaType' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}"
payload := strings.NewReader("{\n \"courseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lessonId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"content\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"duration\": 123,\n \"isDraft\": true,\n \"free\": true,\n \"coverUrl\": \"<string>\",\n \"launchAt\": \"2023-11-07T05:31:56Z\",\n \"finishAt\": \"2023-11-07T05:31:56Z\",\n \"isAudio\": true,\n \"showSubtitles\": true,\n \"moduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"filename\": \"<string>\",\n \"size\": 123\n }\n ],\n \"mediaAssetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"instructorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"showCompleteButton\": true,\n \"allowComments\": true,\n \"allowPdfDownload\": true,\n \"mediaType\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"courseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lessonId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"content\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"duration\": 123,\n \"isDraft\": true,\n \"free\": true,\n \"coverUrl\": \"<string>\",\n \"launchAt\": \"2023-11-07T05:31:56Z\",\n \"finishAt\": \"2023-11-07T05:31:56Z\",\n \"isAudio\": true,\n \"showSubtitles\": true,\n \"moduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"filename\": \"<string>\",\n \"size\": 123\n }\n ],\n \"mediaAssetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"instructorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"showCompleteButton\": true,\n \"allowComments\": true,\n \"allowPdfDownload\": true,\n \"mediaType\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.cativalab.digital/tenant/api/v2/admin/education/courses/{courseId}/lessons/{lessonId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"courseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lessonId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"htmlContent\": \"<string>\",\n \"content\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"duration\": 123,\n \"isDraft\": true,\n \"free\": true,\n \"coverUrl\": \"<string>\",\n \"launchAt\": \"2023-11-07T05:31:56Z\",\n \"finishAt\": \"2023-11-07T05:31:56Z\",\n \"isAudio\": true,\n \"showSubtitles\": true,\n \"moduleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"filename\": \"<string>\",\n \"size\": 123\n }\n ],\n \"mediaAssetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"instructorId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"showCompleteButton\": true,\n \"allowComments\": true,\n \"allowPdfDownload\": true,\n \"mediaType\": 123\n}"
response = http.request(request)
puts response.read_bodyAutorizações
Partner API key (cativa_...) or a JWT, sent as: Authorization: Bearer .
Corpo
application/json
Show child attributes
Show child attributes
Resposta
200
OK
⌘I
